<? $page_title='入库明细' ?>
<?include "FASHION/page_header.phtml"?>
<script language="JavaScript" src="<?php echo $root; ?>/util/datepicker/WdatePicker.js"></script>

<form method="post">
	关键字：<input type="text" name="key" value="<?= fetch_a_string('key') ?>" size="12" />
	&nbsp; 时间自：
	<input type="text" class="wdate" id="from" name="from" size="10" value="<?= fetch_a_string('from')?>"
		   onfocus="WdatePicker({onpicked:function(){$dp.$('to').focus();},maxDate:'#F{$dp.$D(\'to\')}'})" readonly />
	至 <input type="text" class="wdate" id="to" name="to" size="10" value="<?= fetch_a_string('to')?>"
		   onfocus="WdatePicker({minDate:'#F{$dp.$D(\'from\')}'})" readonly />
	&nbsp; 类型：<?= Html::options2(array( 'data'=>$types, 'tips'=>'', 'val'=>fetch_a_int('type'),
			'name'=>'type' )) ?>
	&nbsp; <input type="submit" value="搜索" />
</form>

<table border=0 class="list" width="100%" id="stuff_list"><tbody>
	<tr class="nobg">
		<th>入库单号</th>
		<th>材料编号</th>
		<th>材料名称</th>
		<th>品牌</th>
		<th>规格</th>
		<th>单位</th>
		<th>数量</th>
		<th>单价</th>
		<th>金额</th>
		<th>入库时间</th>
		<th>入库类型</th>
		<th>仓库</th>
		<th>质检/移交</th>
		<th width="100">备注</th>
	</tr>
<{if $list}>
<?$num=0;$total=0;?>
<{foreach item=ware from=$list}>
	<tr id="selstf_<{$ware.id}>">
		<td><{$ware.bound_sno}></td>
		<td><{$ware.sno}>&nbsp;</td>
		<td><{$ware.name}>&nbsp;</td>
		<td><{$ware.brand}></td>
		<td><{$ware.specific}></td>
		<td><{$ware.unit}></td>
		<td class="decimal"><{$ware.amount}></td>
		<td class="fnum"><{$ware.price}></td>
		<td class="fnum"><{= $ware.price * $ware.amount}></td>
		<td><{= date('Y-m-d H:i', $ware.addtime)}></td>
		<td><{= BoundHelper::type2txt($ware.type) }></td>
		<td><{$ware.warehouse}></td>
		<td><{= join(' ', UserHelper::getNamesByIds(explode(',',$ware['reviewers'])))}></td>
		<td class="text"><{$ware.remark}></td>
	</tr>
        <?$num+=$ware.amount;$total+=$ware.price * $ware.amount;?>
<{/foreach}>
<tr><td colspan="6">本页合计</td><td class="decimal"><{$num}></td><td></td><td class="fnum"><{$total}></td><td colspan="5"></td></tr>
<{/if}>

</tbody></table>

<? Html::pager($pager) ?>

<?include "FASHION/page_footer.phtml"?>
